import {takeEvery} from 'redux-saga/effects'
import {getLogin,getOpreaters,edmitAuth,delOpreate} from './login'
import {getShop,edmitShop,getDetail,delShop,addShop} from './shop'
import {getClassify,delClassify,edmitClassify,addClassify} from './classify'
import {getFormat,delFormat,edmitFormat,addFormat} from './format'
import { getpinShop, getpinSwitch, getpinDelete, getpinSearch, getpinPinz } from '../pages/Marketing/JoinGoods/model'
import {getEvaluat,delEvaluat,edmitEvaluat,addEvaluat} from './evaluat'
import { getpinAdd } from '../pages/PinAdd/model'
function * rootSaga(){
    //登录
    yield takeEvery('get-login',getLogin);
    //权限
    yield takeEvery('get_opreaters',getOpreaters)
    yield takeEvery('edmit_auth',edmitAuth)
    yield takeEvery('delete_opreate',delOpreate)
    //商品
    yield takeEvery('get_shop',getShop);
    yield takeEvery('get_detail',getDetail)
    yield takeEvery('add_recycle',edmitShop)
    yield takeEvery('edmit_shop',edmitShop)
    yield takeEvery('add_newshop',addShop)
    yield takeEvery('delete_shop',delShop)
    yield takeEvery('recover_shop',edmitShop)
    //分类
    yield takeEvery('get_classify',getClassify)
    yield takeEvery('delete_classify',delClassify)
    yield takeEvery('edmit_classify',edmitClassify)
    yield takeEvery('add_classify',addClassify)
    //规格
    yield takeEvery('get_format',getFormat)
    yield takeEvery('delete_formate',delFormat)
    yield takeEvery('edmit_format',edmitFormat)
    yield takeEvery('add_format',addFormat)
    //评价
    yield takeEvery('get_evaluat',getEvaluat)
    yield takeEvery('delete_evaluat',delEvaluat)
    yield takeEvery('edmit_evaluat',edmitEvaluat)
    yield takeEvery('add_evaluat',addEvaluat)
    //拼团
    yield takeEvery('get_pinShop', getpinShop)
    yield takeEvery('get_pinSwitch', getpinSwitch)
    yield takeEvery('get_pinDelete', getpinDelete)
    yield takeEvery('get_pinSearch', getpinSearch)
    yield takeEvery('get_pinPinz', getpinPinz)
    yield takeEvery('get_pinAdd', getpinAdd)
}


export default rootSaga